package first.endtoend
/*
service implemented to render tag related to a Family
 */

class TagService
{
    def traceService

    def serviceMethod()
    {

    }

    def toJson(Family aFamily)
    {

        def listResult = new ArrayList()
        RationCard rationCard
        Tag tag
        if (aFamily)
        {
            rationCard = aFamily.rationCard
            if (rationCard)
            {
                listResult = new ArrayList<Beneficiary>()
                tag = rationCard.tag
                if (tag)
                {
                    tag.traces.each {
                        listResult.add(traceService.toJson(it))
                    }


                }
            }
        }
        return listResult
    }
}
